home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus Special 23
/
AMIGAplus Sonderheft 23 (2000)(Falke)(DE)[!].iso
/
Rexx
/
Swapconfigs.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1999-11-06
|
1KB
|
37 lines
/* Multiple cron.config file
** v2.0 by Jim Hines
** v2.1 Added a delay between the two copies.
** Modify this script however you like.
** Use the configfile for the argument. Complete paths MUST be given.
** There will be a default 12 second delay in the actual coping of config files
** to deal with file locks from the daemon. This can be changed though by adding
** a second argument in seconds. ie: rx swapconfig myconfigpath 30
** would create a 30 second delay instead of the default 12 second delay.
*/
arg file tdelay
if file = '' then do
call message('No argument.')
exit
end
if tdelay = '' then tdelay = 12 /* 12 seconds */
if tdelay ~= '' then do
tdelay = tdelay * 50 /* Convert seconds to ticks */
end
if ~exists('EZCron:prefs/config.prefs') then configfile = 't:cron.config'
else do
call open(configprefs, 'EZCron:Prefs/config.prefs', 'R')
configfile = readln(configprefs)
call close(configprefs)
end
if configfile ~= '' then do
address command 'copy' file 's:cron.config'
call delay(tdelay) /* This 12 second delay is necessary to keep from conflicts with the daemon */
address command 'copy' file configfile
end
address EZCRONPREFS refresh
exit
message: procedure
call rtezrequest(arg(1),'Okay!','Load EZCron config Error','rt_reqpos = reqpos_centerscr rtez_flags=ezreqf_centertext',)
exit